<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      lang="en-us"
      xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <!--<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">-->

    <title> 新闻后台管理 </title>
    <meta name="description" content="">
    <meta name="author" content="">

    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

    <!-- Basic Styles -->
    <link rel="stylesheet" type="text/css" media="screen" href="../static/css/bootstrap.min.css"
          th:href="@{/resources/css/bootstrap.min.css}">
    <link rel="stylesheet" type="text/css" media="screen" href="../static/css/font-awesome.min.css"
          th:href="@{/resources/css/font-awesome.min.css}">

    <!-- SmartAdmin Styles : Caution! DO NOT change the order -->
    <link rel="stylesheet" type="text/css" media="screen" href="../static/css/smartadmin-production-plugins.min.css"
          th:href="@{/resources/css/smartadmin-production-plugins.min.css}">
    <link rel="stylesheet" type="text/css" media="screen" href="../static/css/smartadmin-production.min.css"
          th:href="@{/resources/css/smartadmin-production.min.css}">
    <link rel="stylesheet" type="text/css" media="screen" href="../static/css/smartadmin-skins.min.css"
          th:href="@{/resources/css/smartadmin-skins.min.css}">

    <!-- SmartAdmin RTL Support -->
    <link rel="stylesheet" type="text/css" media="screen" href="../static/css/smartadmin-rtl.min.css"
          th:href="@{/resources/css/smartadmin-rtl.min.css}">

    <!-- FAVICONS -->
    <link rel="shortcut icon" href="../static/img/favicon/favicon.ico" type="image/x-icon"
          th:href="@{/resources/img/favicon/favicon.ico}">
    <link rel="icon" href="../static/img/favicon/favicon.ico" type="image/x-icon"
          th:href="@{/resources/img/favicon/favicon.ico}">

    <style type="text/css">
        body, html, #map {
            width: 100%;
            height: 100%;
            overflow: hidden;
            margin: 0;
        }
    </style>


</head>

<body class="">

<!-- HEADER -->
<header id="header">
    <div id="logo-group">

        <!-- PLACE YOUR LOGO HERE -->
        <span id="logo"><a th:href="@{/}"> <img th:src="@{/resources/img/logo.png}" alt="logo"/></a></span>
        <!-- END LOGO PLACEHOLDER -->

    </div>

    <!-- pulled right: nav area -->
    <div class="pull-right">

        <!-- collapse menu button -->
        <div id="hide-menu" class="btn-header pull-right">
            <span> <a href="javascript:void(0);" data-action="toggleMenu" title="Collapse Menu"><i
                    class="fa fa-reorder">隐藏</i></a> </span>
        </div>
        <!-- end collapse menu -->

        <!-- logout button -->
        <div id="logout" class="btn-header transparent pull-right">
            <span> <a th:href="@{/logout}" title="登出" data-action="userLogout" data-logout-msg="您确定要退出登录吗?"><i
                    class="fa fa-sign-out">退出</i></a> </span>
        </div>
        <!-- end logout button -->

        <!-- fullscreen button -->
        <div id="fullscreen" class="btn-header transparent pull-right">
            <span> <a href="javascript:void(0);" data-action="launchFullscreen" title="全屏"><i class="fa fa-arrows-alt">全屏</i></a> </span>
        </div>
        <!-- end fullscreen button -->
        <!-- home button -->
        <div id="home" class="btn-header transparent pull-right">
            <span> <a th:href="@{/}" title="回到首页"><i class="fa fa-home">首页</i></a> </span>
        </div>
        <!-- end home button -->

    </div>
    <!-- end pulled right: nav area -->

</header>
<!-- END HEADER -->

<!-- Left panel : Navigation area -->
<aside id="left-panel">
    <nav>
        <ul>
            <li class="active">
                <a th:href="@{/}">
                    <i class="fa fa-lg fa-book"></i>
                    <span class="menu-item-parent fa-lg">首页</span>
                </a>
            </li>
            <li>
                <a href="javascript:">
                    <i class="fa fa-lg fa-book"></i>
                    <span class="menu-item-parent fa-lg">频道管理</span>
                </a>
                <ul>
                    <li>
                        <a th:href="@{/channel/setting}">
                            <i class="fa fa-lg fa-edit"></i>
                            <span class="menu-item-parent fa-lg">频道管理</span>
                        </a>
                    </li>
                    <hr>
                    <li th:each="channel : ${channels}"
                        th:attrappend="data-channel-id=${channel.channel_id}" class="channelLi">
                        <a href="javascript:">
                            <i class="fa fa-lg fa-edit"></i>
                            <span class="menu-item-parent fa-lg" th:text="${channel.title}">频道</span>
                        </a>
                    </li>

                </ul>
            </li>
            <li>
                <a th:href="@{/article/list}">
                    <i class="fa fa-lg fa-book"></i>
                    <span class="menu-item-parent fa-lg">新闻管理</span>
                </a>
            </li>

            <!--<li>-->
                <!--<a href="javascript:">-->
                    <!--<i class="fa fa-lg fa-book"></i>-->
                    <!--<span class="menu-item-parent fa-lg">其他</span>-->
                <!--</a>-->
                <!--<ul>-->
                    <!--<li>-->
                        <!--<a th:href="@{/image/list}">-->
                            <!--<i class="fa fa-lg fa-edit"></i>-->
                            <!--<span class="menu-item-parent fa-lg">图片资源</span>-->
                        <!--</a>-->
                    <!--</li>-->
                <!--</ul>-->
            <!--</li>-->
        </ul>
    </nav>
</aside>
<!-- END NAVIGATION -->
<!-- MAIN PANEL -->
<div id="main" role="main">

    <!-- RIBBON -->
    <div id="ribbon">
        <!-- breadcrumb -->
        <ol class="breadcrumb">
            <i class="fa fa-arrow-right"></i>
            <li class="fa fa-lg">网站基本信息</li>
        </ol>
        <!-- end breadcrumb -->
    </div>

    <!-- MAIN CONTENT -->
    <div id="content">


        <!-- END RIBBON -->
        <!-- widget grid -->
        <section id="widget-grid" class="">

            <!-- row -->

            <div class="row">

                <!-- NEW WIDGET START -->
                <article class="col-xs-12 col-sm-12 col-md-10 col-md-offset-1 col-lg-offset-2 col-lg-8">

                    <!-- Widget ID (each widget will need unique ID)-->
                    <div class="jarviswidget jarviswidget-color-blueDark" id="wid-id-0" data-widget-editbutton="false">

                        <header>
                            <span class="widget-icon"> <i class="fa fa-map-marker"></i> </span>
                        </header>

                        <!-- widget div-->
                        <div>

                            <!-- widget content -->
                            <div class="widget-body no-padding">

                                <form class="smart-form">
                                    <header>
                                        开发者介绍
                                    </header>

                                    <fieldset>
                                        <div class="row">
                                            <section class="col col-3">
                                                <label class="label font-lg">组长：</label>
                                                <label class="label font-xl" id="leader">
                                                    凌志远
                                                </label>
                                            </section>
                                            <section class="col col-8">
                                                <label class="label font-lg">组员：</label>
                                                <label class="label font-xl" id="member">
                                                    徐健 李志强 谌锐 蔡超 刘键源
                                                </label>
                                            </section>
                                        </div>
                                    </fieldset>
                                    <fieldset>
                                        <section class="">
                                            <label class="label state-disabled">描述：</label>
                                            <label class="textarea textarea-resizable">
                                                <textarea rows="10" name="description" id="description"
                                                          class="custom-scroll" disabled="disabled"></textarea>
                                            </label>
                                        </section>
                                    </fieldset>

                                    <footer>
                                        <button type="button" id="refresh_info_btn" href="javascript:"
                                                class="btn btn-success">
                                            <i class="fa fa-refresh"></i>
                                            刷新
                                        </button>
                                    </footer>
                                </form>

                            </div>
                            <!-- end widget content -->

                        </div>
                        <!-- end widget div -->


                    </div>
                    <!-- end widget -->


                </article>
                <!-- WIDGET END -->

            </div>

            <!-- end row -->

        </section>
        <!-- end widget grid -->

    </div>
    <!-- END MAIN CONTENT -->

</div>
<!-- END MAIN PANEL -->


<!-- PAGE FOOTER -->
<div class="page-footer">
    <div class="row">
        <div class="col-xs-12 col-sm-6">
            <span class="txt-color-white">新闻后台管理</span>
        </div>

    </div>
</div>
<!-- END PAGE FOOTER -->

<!--================================================== -->

<script src="../static/js/libs/jquery-2.1.1.min.js" th:src="@{/resources/js/libs/jquery-2.1.1.min.js}"></script>

<script src="../static/js/libs/jquery-ui-1.10.3.min.js" th:src="@{/resources/js/libs/jquery-ui-1.10.3.min.js}"></script>

<!-- IMPORTANT: APP CONFIG -->
<script src="../static/js/app.config.js" th:src="@{/resources/js/app.config.js}"></script>

<!-- BOOTSTRAP JS -->
<script src="../static/js/bootstrap/bootstrap.min.js" th:src="@{/resources/js/bootstrap/bootstrap.min.js}"></script>

<!-- JARVIS WIDGETS -->
<script src="../static/js/smartwidgets/jarvis.widget.min.js"
        th:src="@{/resources/js/smartwidgets/jarvis.widget.min.js}"></script>

<!-- JQUERY VALIDATE -->
<script src="../static/js/plugin/jquery-validate/jquery.validate.min.js"
        th:src="@{/resources/js/plugin/jquery-validate/jquery.validate.min.js}"></script>

<!-- JQUERY MASKED INPUT -->
<script src="../static/js/plugin/masked-input/jquery.maskedinput.min.js"
        th:src="@{/resources/js/plugin/masked-input/jquery.maskedinput.min.js}"></script>

<!-- JQUERY SELECT2 INPUT -->
<script src="../static/js/plugin/select2/select2.min.js"
        th:src="@{/resources/js/plugin/select2/select2.min.js}"></script>

<!--[if IE 8]>

<h1>Your browser is out of date, please update your browser by going to www.microsoft.com/download</h1>

<![endif]-->

<!-- MAIN APP JS FILE -->
<script src="../static/js/app.min.js" th:src="@{/resources/js/app.min.js}"></script>

<script th:inline="javascript">
    /*<![CDATA[*/
    // DO NOT REMOVE : GLOBAL FUNCTIONS!
    $(function () {

        pageSetUp();

        $(".channelLi").click(function () {
            var url = /*[[@{/channel/toEdit}]]*/"";
            var channel_id = $(this).data("channel-id");
            window.location.href = url + "?channel_id=" + channel_id;
        });

        function getSystemInfo() {
            var url;
            /*[+
             url = [[@{/system/info}]];
             +]*/
            $.get(url)
                    .done(function (data) {
                        $("#cms_version").text(data.cms_version);
                        $("#memory_used").text(data.memory_used);
                        $("#memory_available").text(data.memory_available);
                        $("#memory_total").text(data.memory_used);
                        $("#description").val(data.description);
                    })
        }

        getSystemInfo();

        $("#refresh_info_btn").click(function () {
            getSystemInfo();
        });


    })
    /*]]>*/
</script>

</body>

</html>